package net.cyue.easyconfiguration.node.converter;

import net.cyue.easyconfiguration.node.api.INodeTypeConverter;

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

public class ArrayNode2SetConverter<T> implements INodeTypeConverter<T[], Set<T>> {
    @Override
    public Set<T> convert(T[] value, String... paths) {
        return Arrays.stream(value).collect(Collectors.toSet());
    }
}
